package patterns.interpreter;

/**
 * Created by lenovo on 2016/11/30 0030.
 * 解释器实现类
 */
public class TerminalExpression implements IExpression{
    private String data;

    public TerminalExpression(String data){
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if (context.contains(data)){
            return true;
        }
        return false;
    }
}
